﻿//OrderLogItem.cs
//Copyright (c) 2013 StockSharp LLC, all rights reserved.
//This code module is part of StockSharp library.
//This code is licensed under the GNU GENERAL PUBLIC LICENSE Version 3.
//See the file License.txt for the license details.
//More info on: http://stocksharp.com

namespace StockSharp.BusinessEntities
{
	using System;
	using System.ComponentModel;

	using Ecng.Common;

	/// <summary>
	/// Строчка лога заявок.
	/// </summary>
	[Serializable]
	[Description("Строчка лога заявок.")]
	public class OrderLogItem : MyTrade
	{
		/// <summary>
		/// Создать <see cref="OrderLogItem"/>.
		/// </summary>
		public OrderLogItem()
		{
		}

		/// <summary>
		/// Получить строковое представление.
		/// </summary>
		/// <returns>Строковое представление.</returns>
		public override string ToString()
		{
			var result = "{0} заявки {1}".Put(Trade == null ? (Order.State == OrderStates.Done ? "Снятие" : "Регистрация") : "Сведение", Order);

			if (Trade != null)
				result += " на сделку {0}".Put(Trade);

			return result;
		}
	}
}